<?php

Yii::import('zii.widgets.CPortlet');

class UserInfo extends CPortlet
{
	/**
	 * @property CActiveDataProvider the reservations.
	 */
	public $reservations;

	/**
	 * Initializes the portlet.
	 */
	public function init()
	{
		$this->reservations=new CActiveDataProvider('Reservation',array(
			'criteria'=>array('condition'=>'ownerId='.Yii::app()->user->id),
		));

		parent::init();
	}

	public function renderContent()
	{
		$this->render('userInfo');
	}
}
